#ifndef __SV_FIFO_HPP__
#define __SV_FIFO_HPP__

#include <iostream>
#include <vector>
#include <unistd.h>

#define FIFO_NAME_MAX_SIZE 128
#define FOOD_BUFFER_SIZE 18

struct stfifo
{
    std::string fifoName;
    int fd;
};

class svfifo
{
private:
    std::vector<struct stfifo> svWriteFIFOVec;
    std::vector<struct stfifo> svReadFIFOVec;

public:
    svfifo();
    ~svfifo();

    int32_t openWriteFIFO(std::string fifo_name);
    int32_t writeFIFO(std::string fifo_name, char *data, int32_t data_len);
    int32_t closeWriteFIFO(std::string fifo_name);

    int32_t openReadFIFO(std::string fifo_name);
    int32_t readFIFO(std::string fifo_name, char *buff, int32_t buff_len);
    int32_t closeReadFIFO(std::string fifo_name);
};

#endif
